package com.nintendo.bubblechat.mapper;

import com.nintendo.bubblechat.entity.dto.UserDTO;
import com.nintendo.bubblechat.entity.pojo.ChatMsg;
import com.nintendo.bubblechat.entity.pojo.Users;
import com.nintendo.bubblechat.entity.vo.UsersVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UsersMapper {

    void saveUser(Users users);

    Users findUserByMobile(String phone);

    /**
     * 修改用户信息
     * @param userDTO
     * @return
     */
    void updateUserInfoByUserId(UserDTO userDTO);

    /**
     * 根据id查找用户
     * @param id
     * @return
     */
    Users findUserByUserId(String id);

    /**
     * 批量查询用户
     * @param requestUserIds
     * @return
     */
    List<UsersVo> findUserByUserIds(List<String> requestUserIds);

    /**
     * 保存消息
     * @param chatMsg
     */
    void saveMsg(ChatMsg chatMsg);

    /**
     * 批量签收消息
     * @param msgIdList
     */
    void batchUpdateMsgSigned(List<String> msgIdList);

}